package com.citcc4.traffic.data.mapper;

import com.citcc4.traffic.data.domain.log.LoganalyzeSectionEntity;
import com.citcc4.traffic.data.domain.log.LoganalyzeSectionEntityExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface LoganalyzeSectionEntityMapper {
    @SelectProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="countByExample")
    long countByExample(LoganalyzeSectionEntityExample example);

    @DeleteProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="deleteByExample")
    int deleteByExample(LoganalyzeSectionEntityExample example);

    @Delete({
        "delete from vehiclenetworking.TB_LOG_ANALYZESECTION",
        "where ID = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    @Insert({
        "insert into vehiclenetworking.TB_LOG_ANALYZESECTION (ID, ANALYZESECTION_WORKORDER_ID, ",
        "STATUS, STATIS_DATE, ",
        "DEL_FLAG, CREATE_DATE, UPDATE_DATE, ",
        "CREATOR, MODIFIER)",
        "values (#{id,jdbcType=VARCHAR}, #{analyzesectionWorkorderId,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=VARCHAR}, #{statisDate,jdbcType=DATE}, ",
        "#{delFlag,jdbcType=CHAR}, #{createDate,jdbcType=DATE}, #{updateDate,jdbcType=DATE}, ",
        "#{creator,jdbcType=VARCHAR}, #{modifier,jdbcType=VARCHAR})"
    })
    int insert(LoganalyzeSectionEntity record);

    @InsertProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="insertSelective")
    int insertSelective(LoganalyzeSectionEntity record);

    @SelectProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ANALYZESECTION_WORKORDER_ID", property="analyzesectionWorkorderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="STATUS", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="STATIS_DATE", property="statisDate", jdbcType=JdbcType.DATE),
        @Result(column="DEL_FLAG", property="delFlag", jdbcType=JdbcType.CHAR),
        @Result(column="CREATE_DATE", property="createDate", jdbcType=JdbcType.DATE),
        @Result(column="UPDATE_DATE", property="updateDate", jdbcType=JdbcType.DATE),
        @Result(column="CREATOR", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="MODIFIER", property="modifier", jdbcType=JdbcType.VARCHAR)
    })
    List<LoganalyzeSectionEntity> selectByExample(LoganalyzeSectionEntityExample example);

    @Select({
        "select",
        "ID, ANALYZESECTION_WORKORDER_ID, STATUS, STATIS_DATE, DEL_FLAG, CREATE_DATE, ",
        "UPDATE_DATE, CREATOR, MODIFIER",
        "from vehiclenetworking.TB_LOG_ANALYZESECTION",
        "where ID = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="ID", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="ANALYZESECTION_WORKORDER_ID", property="analyzesectionWorkorderId", jdbcType=JdbcType.VARCHAR),
        @Result(column="STATUS", property="status", jdbcType=JdbcType.VARCHAR),
        @Result(column="STATIS_DATE", property="statisDate", jdbcType=JdbcType.DATE),
        @Result(column="DEL_FLAG", property="delFlag", jdbcType=JdbcType.CHAR),
        @Result(column="CREATE_DATE", property="createDate", jdbcType=JdbcType.DATE),
        @Result(column="UPDATE_DATE", property="updateDate", jdbcType=JdbcType.DATE),
        @Result(column="CREATOR", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="MODIFIER", property="modifier", jdbcType=JdbcType.VARCHAR)
    })
    LoganalyzeSectionEntity selectByPrimaryKey(String id);

    @UpdateProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") LoganalyzeSectionEntity record, @Param("example") LoganalyzeSectionEntityExample example);

    @UpdateProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") LoganalyzeSectionEntity record, @Param("example") LoganalyzeSectionEntityExample example);

    @UpdateProvider(type=LoganalyzeSectionEntitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LoganalyzeSectionEntity record);

    @Update({
        "update vehiclenetworking.TB_LOG_ANALYZESECTION",
        "set ANALYZESECTION_WORKORDER_ID = #{analyzesectionWorkorderId,jdbcType=VARCHAR},",
          "STATUS = #{status,jdbcType=VARCHAR},",
          "STATIS_DATE = #{statisDate,jdbcType=DATE},",
          "DEL_FLAG = #{delFlag,jdbcType=CHAR},",
          "CREATE_DATE = #{createDate,jdbcType=DATE},",
          "UPDATE_DATE = #{updateDate,jdbcType=DATE},",
          "CREATOR = #{creator,jdbcType=VARCHAR},",
          "MODIFIER = #{modifier,jdbcType=VARCHAR}",
        "where ID = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(LoganalyzeSectionEntity record);
}